<?php
namespace bee;

/**
 *
 * @author dzelenika
 * Base exception class
 * All exceptions should extend this class
 *
 */
class exception extends \Exception
{
	public function __construct($message, $code, \Exception $previous = null)
	{
		parent::__construct($message, $code, $previous);
  }

  public function __toString()
  {
  	return __CLASS__ . ": [{$this->code}]: {$this->message}";
  }

}

/**
 * @abstract Exception code plan
 *
 * 0xxxx - core exceptions
 * 00001 - "Cloning ".__CLASS__. " is not allowed."
 * 00002 - "Unserializing " . __CLASS__ . " is not allowed"
 * 00003 - "Requested parameter " . $name . " not found"
 * 1xxxx
 *
 * 2xxxx
 *
 * 3xxxx
 *
 * 4xxxx
 *
 * 5xxxx
 *
 * 6xxxx
 *
 * 7xxxx
 *
 * 8xxxx
 *
 * 9xxxx
 *
 */